.class final Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;
.super Ljava/lang/Object;
.source "GPSStatusView.kt"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->onLocationUpdate(Llt/farmis/libraries/externalgps/GPSLocation;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = null
.end annotation


# instance fields
.field final synthetic $location:Llt/farmis/libraries/externalgps/GPSLocation;

.field final synthetic this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;Llt/farmis/libraries/externalgps/GPSLocation;)V
    .locals 0

    iput-object p1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 5

    .line 147
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-object v2, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v2}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getLastUpdate$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)J

    move-result-wide v2

    sub-long/2addr v0, v2

    const/16 v2, 0x12c

    int-to-long v2, v2

    cmp-long v4, v0, v2

    if-lez v4, :cond_6

    .line 148
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getHdop$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v1, v1, Llt/farmis/libraries/externalgps/GPSLocation;->dilution:F

    invoke-static {v1}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 149
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getLatlon$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v2, v2, Llt/farmis/libraries/externalgps/GPSLocation;->lat:F

    invoke-static {v2}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, " / "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v2, v2, Llt/farmis/libraries/externalgps/GPSLocation;->lon:F

    invoke-static {v2}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 150
    :cond_1
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getSpeed$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v1, v1, Llt/farmis/libraries/externalgps/GPSLocation;->velocity:F

    float-to-double v1, v1

    iget-object v3, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-virtual {v3}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v3

    const-string v4, "speed_unit"

    invoke-static {v1, v2, v4, v3}, Llt/noframe/gpsfarmguide/utils/UnitsHelper;->getAccuracyByPrefs(DLjava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 151
    :cond_2
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getSatellites$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_3

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v1, v1, Llt/farmis/libraries/externalgps/GPSLocation;->sattelites:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 153
    :cond_3
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-static {v0, v1, v2}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$setLastUpdate$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;J)V

    .line 154
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getLastFix$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_4

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v2, v2, Llt/farmis/libraries/externalgps/GPSLocation;->time:F

    invoke-static {v2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v2

    invoke-virtual {v1, v2}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->parseDate(Ljava/lang/Float;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 155
    :cond_4
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    iget v1, v1, Llt/farmis/libraries/externalgps/GPSLocation;->quality:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->onQualityChanged(Ljava/lang/Integer;)V

    .line 156
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->$location:Llt/farmis/libraries/externalgps/GPSLocation;

    invoke-virtual {v1}, Llt/farmis/libraries/externalgps/GPSLocation;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/16 v1, 0x20

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView$onLocationUpdate$1;->this$0:Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    invoke-static {v1}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->access$getLastFix$p(Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;)Landroid/widget/TextView;

    move-result-object v1

    if-eqz v1, :cond_5

    invoke-virtual {v1}, Landroid/widget/TextView;->getEditableText()Landroid/text/Editable;

    move-result-object v1

    if-eqz v1, :cond_5

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_5
    const/4 v1, 0x0

    :goto_0
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/16 v1, 0x29

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "setting text"

    invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    :cond_6
    return-void
.end method
